<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>splice的用法</title>
	<script>
		var arr = [];
		arr = [2, 34, 56, 74, 1];
		console.log(arr);
		//从索引为2的位置，删除一个内容
		arr.splice(2,1);
		console.log(arr);
		//从索引为2的位置，添加内容
		arr.splice(2,0,123,432,123,12312,555)
		console.log(arr)

	</script>
</head>

<body>

</body>

</html>
